<!DOCTYPE html>
<#assign secSelect = JspTaglibs["http://www.casic304.cn/secSelect"] />
<#assign dicSelect = JspTaglibs["http://www.casic304.cn/dicSelect"]/>
<#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />
<html>
<head>
    <meta charset="utf-8">
    <title>飞行试验奖惩进度反馈基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";

    </script>
</head>
<body class="listBody">

<div class="qbdms-bodyDiv">
    <div class="layui-table-view-body qbdms-add-view-body" style="height: 100%;overflow: auto">
        <form class="formPreview layui-form" requrl="${ctx}/qbdms/wQbdFlightJc/getFeedbackData"
              lay-filter="wFlightRewardsProgressBackDataForm">
            <input name="id" id="key" value="" hidden>
            <input name="fillDeptId" value="" hidden>
            <input name="fillDept" value="" hidden>
            <input name="fillmanAccount" value="" hidden>
            <input name="fillman" value="" hidden>
            <input name="fillDate" value="" hidden>

            <div class="qbdms-formTitle">飞行试验奖惩进度反馈 <i class="qbdms-returnOn closeWindow">返回</i>
            </div>
            <div class="qbdms-formBody" style="margin-bottom: 75px">
                <div class="dragInfo temSpace">
                    <@fillDept.dept css="selectorCont writer-info" id="tbxx"/>
                </div>
                <div class="layui-row">
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="飞行试验名称">飞行试验名称</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="fxsymc"  disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="fxsymc">
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="密级">密级</label>
                        <div class="layui-input-block qbdms-input">
                            <@secSelect.sec_select name="secret" data_src=1 activity=false />
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="年度">年度</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="nd"  disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="nd">
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="型号名称">型号名称</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="xhmc"  disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="xhmc">
                        </div>
                    </div>


                    <div class="qbdms-oneForm" style="width: 100%">
                        <label class="layui-form-label qbdms-label" title="总体单位名称">总体单位名称</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="ztswmcstr"   disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="ztswmc">
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="项目类型">项目类型</label>
                        <div class="layui-input-block qbdms-input">
                            <@dicSelect.dic name="xmlx" nodeKey="xmlx" activity=false addSelectText=false/>
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="项目阶段">项目阶段</label>
                        <div class="layui-input-block qbdms-input">
                            <@dicSelect.dic name="xmjd" nodeKey="xmjd" activity=false addSelectText=false/>
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="项目类别">项目类别</label>
                        <div class="layui-input-block qbdms-input">
                            <@dicSelect.dic name="xmlb" nodeKey="xmlb" activity=false addSelectText=false/>
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="初始奖励额度（万元）">初始奖励额度（万元）</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="csjled"  disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="csjled">
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="初始处罚额度（万元）">初始处罚额度（万元）</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="cscfed"  disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="cscfed">
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="产品价格（参考值）（万元）">产品价格（参考值）（万元）</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="cpjg" disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="cpjg">
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="P值">P值</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="pz"   disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="pz">
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="计划奖励总额度（万元）">计划奖励总额度（万元）</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="jhjlzed"  disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="jhjlzed">
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="计划处罚总额度（万元）">计划处罚总额度（万元）</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="jhcfzed" disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="jhcfzed">
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="奖励工资总额合计（万元）">奖励工资总额合计（万元）</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="jlgzzehjz"  disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="jlgzzehjz">
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="减免利润上缴合计（万元）">减免利润上缴合计（万元）</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="jmlrsjhjz" disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="jmlrsjhjz">
                        </div>
                    </div>


                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="主管部门">主管部门</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="zgbm" disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="zgbm">
                        </div>
                    </div>




                    <div class="qbdms-oneForm isShow isValid" id="isTest">
                        <label class="layui-form-label qbdms-label" title="是否试验">是否试验<span
                            style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <@dicSelect.dic name="sfsy" nodeKey="sf" filter="isTest" search=true
                            addSelectText=true verify="required" reqtext="是否试验是必填项"/>
                        </div>
                    </div>

                    <div class="qbdms-oneForm  isShow isValid" id="syjg">
                        <label class="layui-form-label qbdms-label" title="试验结果">试验结果<span
                            style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <@dicSelect.dic name="syjg" nodeKey="syjg" search=true
                            addSelectText=true verify="required" reqtext="试验结果是必填项"/>
                        </div>
                    </div>

                    <div class="qbdms-oneForm isShow isValid" id="syrq">
                        <label class="layui-form-label qbdms-label" title="试验日期">试验日期<span
                            style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="syrq" placeholder="请输入"
                                   lay-verify="required"
                                   autocomplete="off"
                                   class="layui-input textInput dateTimeFiled time-init"
                                   maxlength="50" fieldname="testDate" lay-reqtext="试验日期是必填项">
                        </div>
                    </div>


                    <div class="qbdms-oneForm ">
                        <label class="layui-form-label qbdms-label" title="奖惩单位名称">奖惩单位名称</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="jlswmcstr"  disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="jlswmcstr">
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="分配比例">分配比例</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="fpblz" disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="fpblz">
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="计划最高奖励额度（万元）">计划最高奖励额度（万元）</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="jhzgjledz"  disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50" fieldname="jhzgjledz">
                        </div>
                    </div>

                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="计划最高处罚额度（万元）">计划最高处罚额度（万元）</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="jhzgcfedz" disabled
                                   autocomplete="off" class="layui-input textInput" maxlength="50"
                                   fieldname="jhzgcfedz">
                        </div>
                    </div>


                    <div class="qbdms-oneForm isValid">
                        <label class="layui-form-label qbdms-label"
                               title="实际奖励额度（万元）">实际奖励额度（万元）<span
                            style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="sjjled" placeholder="请输入"
                                   lay-verify="required|money"
                                   autocomplete="off" class="layui-input textInput" maxlength="8"
                                   fieldname="sjjled" lay-reqtext="实际奖励额度（万元）是必填项">
                        </div>
                    </div>

                    <div class="qbdms-oneForm isValid">
                        <label class="layui-form-label qbdms-label"
                               title="实际处罚额度（万元）">实际处罚额度（万元）<span
                            style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="sjcfed" placeholder="请输入"
                                   lay-verify="required|money"
                                   autocomplete="off" class="layui-input textInput" maxlength="8"
                                   fieldname="sjcfed" lay-reqtext="实际处罚额度（万元）是必填项">
                        </div>
                    </div>


                    <div class="qbdms-oneForm isValid">
                        <label class="layui-form-label qbdms-label" title="以奖励工资总额形式兑现合计（万元）">
                            <p>以奖励工资总额形式兑现合计（万元）<span
                                style="color: red;">*</span></p></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="yjlgzzexsdxhj"
                                   placeholder="请输入"
                                   lay-verify="required|money"
                                   autocomplete="off" class="layui-input textInput" maxlength="8"
                                   fieldname="yjlgzzexsdxhj" lay-reqtext="以奖励工资总额形式兑现合计（万元）是必填项">
                        </div>
                    </div>

                    <div class="qbdms-oneForm isValid">
                        <label class="layui-form-label qbdms-label" title="以奖励工资总额形式兑现日期">以奖励工资总额形式兑现日期<span
                            style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="yjlgzzexsdxrq" placeholder="请输入"
                                   lay-verify="required"
                                   autocomplete="off"
                                   class="layui-input textInput  dateTimeFiled time-init"
                                   maxlength="50" fieldname="yjlgzzexsdxrq" lay-reqtext="以奖励工资总额形式兑现日期是必填项">
                        </div>
                    </div>

                    <div class="qbdms-oneForm isValid">
                        <label class="layui-form-label qbdms-label" title="以减免利润上缴形式兑现合计（万元）"><p>以减免利润上缴形式兑现合计（万元）<span
                            style="color: red;">*</span></p></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="yjmlrsjxsdxhj"
                                   placeholder="请输入"
                                   lay-verify="required|money"
                                   autocomplete="off" class="layui-input textInput" maxlength="8"
                                   fieldname="yjmlrsjxsdxhj" lay-reqtext="以减免利润上缴形式兑现合计（万元）是必填项">
                        </div>
                    </div>

                    <div class="qbdms-oneForm isValid">
                        <label class="layui-form-label qbdms-label" title="以减免利润上缴形式兑现日期">以减免利润上缴形式兑现日期<span
                            style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="yjmlrsjxsdxrq" lay-reqtext="以减免利润上缴形式兑现日期是必填项"
                                   placeholder="请输入" lay-verify="required"
                                   autocomplete="off"
                                   class="layui-input textInput  dateTimeFiled time-init"
                                   maxlength="50" fieldname="yjmlrsjxsdxrq">
                        </div>
                    </div>
                    <div class="qbdms-oneForm qbdms-textarea">
                        <label class="layui-form-label qbdms-label" title="备注">备注</label>
                        <div class="layui-input-block qbdms-input">
                            <textarea rows="2" class="layui-textarea" placeholder="请输入"
                                      name="bz"
                                      maxlength="666" ></textarea>
                        </div>
                    </div>
                    <div class="qbdms-oneForm qbdms-textarea isShow isValid">
                        <label class="layui-form-label qbdms-label" title="情况说明">情况说明<span
                            style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">

                            <textarea rows="2" class="layui-textarea" placeholder="请输入"
                                      name="qksm"
                                      maxlength="666" lay-reqtext="情况说明是必填项"></textarea>
                        </div>
                    </div>

                </div>
            </div>
            <div class="layui-form-item btnformItem">
                <p>
                    <span id="hideAndShow" >
                        <a lay-submit lay-filter="wFlightRewardsProgressBack" class="layui-btn btn-n privateSubmit qbdms-oneBtn"
                           requrl="${ctx}/qbdms/wQbdFlightJc/saveFeedbackDate">提交</a>
                    </span>
                    <button type="reset" id="closeWindow" style="margin-left: 10px;"
                            class="layui-btn layui-btn-sm btn-save qbdms-oneBtnLine">取消
                    </button>
                </p>
            </div>
        </form>
    </div>
</div>





<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>

    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index'  //主入口模块
    }).use(['index','common','laydate','jquery','qbdmsForm','publicMethods'], function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var form = layui.qbdmsForm;
        var common = layui.common;
        var publicMethods=layui.publicMethods;
        var dateTimeFiledLen = $(".dateTimeFiled");
        for(var i=0;i<dateTimeFiledLen.length;i++){
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                ,type: 'date'
                ,trigger: 'click'
            });
        }

        //关闭当前页面
        $("#closeWindow,.closeWindow").click(function () {
            window.location.href = '${ctx}/qbdms/wQbdFlightJc/view/processList';
        });
        form.verify({
            money: function (value, item) {
                if (value && !new RegExp(/^((0{1}\.\d{1,2})|([1-9]\d*\.{1}\d{1,2})|([1-9]+\d*)|0)$/).test(value)) {
                    return common.verifyTitleAdd(item) + "请输入数字且小数最多两位";
                }
            }
        });

        common.updateForm({
            name:'wFlightRewardsProgressBackDataForm',
            idValue:"${id}",
            primary:"id",
            updateCallback:function (data) {
                if (common.filterRecord(data)) {
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'}, function (index) {
                        layer.close(index);
                        $("#closeWindow").click();
                    });
                } else {
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'});
                }
                if($(".privateSubmit")){
                    $(".privateSubmit").attr("disabled",false).css("pointer-events","auto");
                }
                return false;
            },
            getCallback:function(data){
                var nd = data.data.wQbdFlightJc.nd;
                var isTest = data.data.sfsy;
                data.data.wQbdFlightJc.jlgzzehjz = data.data.wQbdFlightJc.jlgzzehj;
                data.data.wQbdFlightJc.jmlrsjhjz = data.data.wQbdFlightJc.jmlrsjhj;
                data.data.fpblz = data.data.fpbl;
                data.data.jhzgjledz = data.data.jhzgjled;
                data.data.jhzgcfedz = data.data.jhzgcfed;
                if(nd){
                    nd = new Date(nd);
                    data.data.wQbdFlightJc.nd = nd.getFullYear();
                }
                isTestFun(isTest);
                form.val("wFlightRewardsProgressBackDataForm",data.data.wQbdFlightJc);

                //名称不同隐藏、取消验证
                if(!(data.data.wQbdFlightJc.ztswmc == data.data.jlswmc)){
                    $(".isShow input,.isShow select,.isShow textarea").each(function(i,n){
                        $(n).attr("lay-verify","");
                    });
                    $(".isShow").hide();
                }
                //没有隐藏的增加外边框
                $(".isValid input:visible,.isValid select:visible,.isValid textarea:visible").each(function(i,n){
                    $(n).css({"border-color": "fuchsia","border-width": "1px"});
                });
            }
        });
        //select选择事件
        form.on('select(isTest)', function(data){
            isTestFun(data.value);
        });
        function isTestFun(data){
            var selSelector = $("select[name='syjg']");
            var inputSelector = $("input[name='syrq']");
            if(data == '是'){
                selSelector.attr("lay-verify","required");
                inputSelector.attr("lay-verify","required");
                $("#syjg").show();
                $("#syrq").show();
            }else{
                selSelector.attr("lay-verify","");
                inputSelector.attr("lay-verify","");
                $("#syjg").hide();
                $("#syrq").hide();
            }
        }
    });
</script>
</body>
</html>